<?php
namespace app\admin\controller;

use think\facade\App;
use ueditor\index;

class General extends Base {

    /**
     * @desc 图片上传
     */
    public function upload() {
        $generalLogic = App::model('common/General', 'logic');
        $result = $generalLogic->upload('file');
        return send_response($result, $generalLogic->errorCode, $generalLogic->message);
    }

    /**
     * @desc 百度UEditor上传
     */
    public function ueditor() {
        $upload = new index();
        return $upload->init();
    }
}
